const columns = (onRemove) => {
  return [
      {
          type: 'selection',
          title: '#',
          width: 60
      },
      {
          type: 'index',
          width: 60,
          align: 'center'
      },
      {
          title: '标题',
          key: 'title',
      },
      {
          title: '作者',
          key: 'author',
          width: 100
      },
      {
          title: '原文链接',
          key: 'originalUrl',
          width:340
      },
      {
          title: '创建日期',
          key: 'ctime',
          width: 180
      },
      {
          title: '维护日期',
          key: 'mtime',
          width: 180
      }, {
          title: '操作',
          key: 'operation',
          width: 200,
          render: (h, { row, column, index }) => {
              return h('div', [
                  h('Button', {
                      on: {
                          click: () => onRemove(row.id)
                      },
                      props: {
                          type: 'text',
                          size: 'small'
                      },
                  }, '编辑'),
                  h('Button', {
                      on: {
                          click: () => onRemove(row.id)
                      },
                      props: {
                          type: 'text',
                          size: 'small'
                      },
                  }, '删除'),
                  h('Button', {
                    on: {
                        click: () => onRemove(row.id)
                    },
                    props: {
                        type: 'text',
                        size: 'small'
                    },
                }, '查看')
              ]);
          }
      }
  ]
}
export default columns;
